import React from "react";
import { View, Text } from "react-native";
import styles from "./index.style";
import {convertDateTimeToBeijingTime, convertToTodayTime} from "@/utils/time-utils";

interface TimeLineProps {
    timestamp: number; // 时间戳
}

/**
 * 时间戳组件
 * @author: FlanChan
 */
export default function TimeLine({timestamp} : TimeLineProps) {
    return (
        <View style={styles.container}>
            <Text style={styles.timestamp}>{convertToTodayTime(convertDateTimeToBeijingTime(timestamp))}</Text>
        </View>
    )
}